-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added TIDAL Plugin + More #45
base: master
Are you sure you want to change the base?
Conversation
Fixes `/etc/systemd/system/ultrasonics.service:11: Neither a valid executable name nor an absolute path: .venv/bin/activate` error on Debian 11 (inside LXC)
"Update" is still pretty dodgy, try to stick to "Append" if it's important
Adds a version string to the footer on the homepage, checks hourly and turns it red when there is a different release version on GitHub. Somewhat solves issue XDGFX#14
I've been using this for a few weeks now. Looks stable. Regarding the OAuth flow, did you try implementing in https://github.com/XDGFX/ultrasonics-api ? |
I've looked into it, but Tidal (or at least tidalapi) doesn't have a 'callback' or anything that needs to be to be hosted externally, so I don't see the point if it can be done from ultrasonics itself. |
Hi @Steve-Tech - thanks for having taken your time to develop this. How can I make use of your plugin? I have downloaded the .py from your repo and added it to the "plugins" folder of my current docker instance (xdgfx/ultrasonics), but unfortunately my docker won't start up anymore. Are there more adjustments needed to get the plugin up and running? Thanks for your help! |
Thanks @Steve-Tech, unfortunately my expertise only goes as far as running a docker. I guess I will have to wait for the PyPI release. I have just done a follow up on this thread, hoping things will move further tamland/python-tidal#31 |
I appear to getting the error
|
Hmm, @LJAM96 how did you install tidalapi? source .venv/bin/activate
git clone -b 0.7.x https://github.com/tamland/python-tidal.git
cd python-tidal/
python3 setup.py install |
Nevermind, it seems like they have release candidates now, if you don't have tidalapi 0.7.x please do the following to install it: pip install tidalapi~=0.7.0rc1 |
I cloned python-tidal, I deleted and tried again with the release candidate PyPi but now when authenticating I get
Thats running |
Yeah, I'm getting the same thing now. |
Hi @Steve-Tech, hope all is well. It seems that the tidalapi 0.7 rewrite has been completed. Is this something we can incorporate now so that I can run this plugin on my docker instance? https://pypi.org/project/tidalapi/ https://github.com/tamland/python-tidal/projects/1 Thanks so much for your help. |
Copy paste from tamland/python-tidal#111: This part isn't correct anymore https://github.com/Steve-Tech/ultrasonics/blob/750c2bb0a928eb680913ef238e79422a1a2fb3c9/ultrasonics/official_plugins/up_tidal.py#L98, it was changed in tamland/python-tidal#73 Also note that you need to check the return status of the load_oauth_session, there's no point in continuing if the session wasn't loaded, generally I would suggest doing the login again if it fails. Also if you want to login via the ui, you should probably not use the simple login, see https://tidalapi.netlify.app/login.html for more details |
Ahh, that makes sense, I've got it working now.
Fixed, I think!
I might have go later, but last time I tried I decided that a lot of ultrasonic's code would need to be changed because there isn't a way to get a dynamic url to show and I didn't have to time to do it, if that makes sense. Thank you @morguldir! @onestix Hopefully it will work now. @LJAM96 Fixed, you just need to pull the changes, and update tidalapi. |
Thanks appears to authenticate now, is the expiry time on the API a limitation of the API? I get a full search of my Spotify playlist on Tidal but appears to fail on the last step. `Searching Tidal for songs: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 1578/1578 [ HTTP error on 500 2022-09-14 11:05:59,807 - 🎧 tidal - ERROR - 500 Server Error: Internal Server Error for url: https://api.tidal.com/v1/playlists/d74847c3-af98-4f6a-b459-5129dcc1300b/items?sessionId=d43fce09-8f17-48e1-99dd-1f597c1b5c69&countryCode=AR&limit=100 (up_tidal.py:118) HTTP error on 500 2022-09-14 11:06:00,231 - 🎧 tidal - ERROR - 500 Server Error: Internal Server Error for url: https://api.tidal.com/v1/playlists/d74847c3-af98-4f6a-b459-5129dcc1300b/items?sessionId=d43fce09-8f17-48e1-99dd-1f597c1b5c69&countryCode=AR&limit=100 (up_tidal.py:118) 2022-09-14 11:06:00,510 - 🎧 tidal - ERROR - An error occurred while trying to contact the Tidal api. (up_tidal.py:123) Traceback (most recent call last): |
I believe it's only used so tidalapi knows when your access token has expired so it can refresh the access token. The refresh token and expiry time are optional, but without it, when the access token expires, tidalapi won't be able to renew it.
I can fix the |
The API appears to work fine. On selecting a modifier 'Spotify Mixer' it will generate a playlist on Tidal. Its only when there is no modifier and I attempt to straight bridge Spotify to Tidal, is the plugin still functional for yourself? |
So i got everything working, but i noticed that multiple songs are getting flagged as " Also when i have it set as multiple playlists on spotify as input it errors out with |
@Steve-Tech Okay so before it ran for like 30sec and output the error i posted before, now it has been running for over 10minutes, but it seems now that it cannot find ANY songs on my playlists even tho they exist on tidal its just giving the couldnt find song error 1 by 1 which might be why its taking so loong to finish, its still not finished as of this msg, and i started it 10:07 and its 10:25 Here is some of the code, not all of it since it cant fit on here since its not finding any song its outputting a msg for each song which is over 1000 songs,
|
@markaabo Can you use 3 ` |
Hi @markaabo, some of the 'Could not find song' lines should be outputting something surrounded by I want to work out why some songs are missing a title first, and then I'll add some more debugging in if I can't. Edit: or worst case post the whole log to pastebin or something. |
@Steve-Tech This is the latest, after trying to rerun it, i just copy from console in docker desktop so if the {} are missing i don't know where i need to find them :/ Also could you add so it outputs the missing songs to a text file, i have asked this before a long time ago, since it would be awesome to have a text file so you can check which songs didnt get added easily and search for them incase they are on tidal but under a slightly different name. a great file structure would be something like: Here is the console output:
|
@Steve-Tech Also would it be possible for it to copy the playlist folder structure from spotify aswell, since currently it just dumps all playlists no folder creating alot of chaos when i have alot of them sorted in folders :) |
Sure I'll do that, also this was the line I was talking about: |
That song is deleted/unavailable on spotify which might be why it has no title it had a title back when it was available the title was just "Drive Forever" |
The not found file uses the `TIDAL_NOT_FOUND_FILE` environment variable, whatever that is set to is the file that will be written to.
@morguldir if you run the docker image with the |
@Steve-Tech So in the docker-compose.yml it should look like this to output the not found songs?:
|
@Steve-Tech i just downloaded the newest version and now it doesnt work again. below is the console:
|
It has to be accessible by the container, so you could do
Damn, give me a few minutes |
Yeah sorry I accidentally deleted a for loop. |
No need to say sorry, i will say tho you're taggin the wrong person your tagging "morguldir" and not me XD Also could you look at some of the freatures i asked for in the previus few msg and respond if its possible, like the folder sync playlist description/image would be nice too :) I am the one to say thank you for the time your spending doing this, its such a time saver and amazing help keeping playlists synced automaticlly truely awesome work! And well i am really sorry to keep bugging you but its now doing this error:
|
Oh damn, how did I not notice! I guess I've just been pressing 'm' and 'tab'.
Should be fixed now. |
@Steve-Tech So it works now, only i have a request could you make it so the text file it outputs like deletes it self and start new on multiple runs like or like so it replaces the file with only the current missing songs from the lastest missing songs. Currently it just adds to the text file making it longer and longer like mine has run like 2 days now and the text file is over 4000 lines, and it just adds to the end every time the sync runs :/ |
@Steve-Tech Now its broken again somehow seems to have broken a few days ago:( This is the error from docker:
I tried redoing the tidal login with the .py which resulted in this error:
|
Done.
That's an error from tidalapi: tamland/python-tidal#146, it seems to be fixed, but just waiting on a new release. |
@Steve-Tech Seems to have been updated tho i did manually fix it before it got updated following a how to in a insue post. :) |
Seems like its been updated again, i get the error:
|
Sorry, I've been fairly busy lately and I'm not sure when I'll have the time to look into it. |
Its no ploblem your doing this amazing thing for free so you just do it when you have time for it :) |
Do you have any time to look into the problems? if not its okay just checking :) |
Sorry no, I haven't. I might be able to look into it mid February, but I also haven't used ultrasonics in ages, so I kinda don't really have the motivation to do much with it. |
Hi,
I've written a TIDAL plugin (to fix #44),
but it relies on tidalapi and the version with playlist functionality is still in development and isn't on PyPI yet, so I'm fine if this doesn't get merged.Also my authentication is pretty janky, I couldn't work out a good way to do it from the ultrasonic web UI.
Oh it's also basically a copy of the up_spotify plugin that's been adapted for TIDAL so the whole thing is pretty janky.
I guess I just wanted to see your thoughts on it.
Thanks,
Steve
Edit: I've also changed the systemd service file slightly, because it didn't work for me (on Debain 11 inside LXC); and attempted issue #14 by adding the current version to the footer on the homepage that turns it red when there is a different release version on GitHub.
Edit 2: tidalapi has release candidates on PyPI now.
Edit 3: tidalapi 0.7.0 has been released.